import cv2 as cv
import numpy as np

img=cv.imread("G:\Learn\CSDN\Work\\baboon.jpg")
source=cv.pyrDown(img)
cv.namedWindow("Source")
cv.imshow("Source",source)

gray=cv.cvtColor(source,cv.COLOR_BGR2GRAY)
cv.namedWindow("Gray")
cv.imshow("Gray",gray)

hsv=cv.cvtColor(source,cv.COLOR_BGR2HSV)
hsvChannels=cv.split(hsv)
cv.imshow("Hue",hsvChannels[0])
cv.imshow("Saturation",hsvChannels[1])
cv.imshow("Value",hsvChannels[2])
cv.waitKey(0)
cv.destroyAllWindows()
